'''
Created on 07-05-2012

@author: Mateusz
'''

'''
while 1:
    begincount = 0
    allinput = ""
    cp = "in> "
    while 1:
        s = raw_input(cp)
        allinput += s + "\n"
        #print alla
        if s.split().count("begin") > 0:
            begincount = begincount + 1
            cp = "--> "
            cp.split(">")[0]
        if s.split().count("end") > 0: #TODO end moze byc w stringu / komentarzu 
            begincount = begincount - 1
        if begincount == 0:
            allinput
            break
'''
'''
from lexer import Lexer
import ply.lex as lex
import ply.yacc as yacc

class Lextest(Lexer):
    def __init__(self, ass):
        lexerr = ass
        
    def func(self):
        print self.lexerr
    
lexx = Lextest()
inp = "2 + 2"
print lexx.reserved
lexx.lexer.input(inp);
while True:
    tok = lexx.lexer.token()
    if not tok: break      # No more input
    print tok
'''
a = 0